<!DOCTYPE html>
<html lang="en">
<script type="text/javascript">
    function modifyAfterDelay() {
        setTimeout('doLocation()', 1000)
    }
    function doLocation() {
        var base_url = window.location.origin;
        self.location = `${base_url}/html/`
    }
</script>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <p>Test</p>
    <button id="button" onclick="modifyAfterDelay()">OK</button>

</body>
</html>